package enge.checkers;

import android.graphics.Color;

public class Checker
{
    private Color      color;
    private PlayerType player;
    private boolean    isKing;
    private float      xC;
    private float      yC;
    private float      radius;
    private boolean    visible;
    private boolean    selected;
    private boolean    jumped;


    public Checker(
        boolean vis,
        PlayerType p,
        boolean king,
        float newXC,
        float newYC,
        float newRadius)
    {
        player = p;
        isKing = king;
        xC = newXC;
        yC = newYC;
        radius = newRadius;
        visible = vis;
        jumped = false;
    }
    
    public Checker()
    {
    	//do nothing
    }


    public void setKing(boolean kong)
    {
        if(kong == true)
        {
            isKing = true;
        }
    }
    public boolean isKing()
    {
        if (isKing)
            return true;
        return false;
    }


    public PlayerType getPlayer()
    {
        return player;
    }


    public Color getColor()
    {
        return color;
    }


    public void setPlayer(PlayerType p)
    {
        player = p;
    }


    public float getX()
    {
        return xC;
    }


    public void setX(float newXC)
    {
        xC = newXC;
    }


    public void setY(float newYC)
    {
        yC = newYC;
    }


    public float getY()
    {
        return yC;
    }


    public float getRadius()
    {
        return radius;
    }


    public void setRadius(float r)
    {
        radius = r;
    }


    public boolean isVisible()
    {
        return visible;
    }


    public void setVisibility(boolean vis)
    {
        visible = vis;
    }


    public void changeVisibilty()
    {
        if (visible)
        {
            visible = false;
        }
        else
        {
            visible = true;
        }
    }


    public void setSelected(boolean v)
    {
        selected = v;
    }


    public boolean isSelected()
    {
        return selected;
    }


    public boolean isJumped()
    {
        return jumped;
    }


    public void setJumped(boolean b)
    {
        jumped = b;
    }

}
